package com.woniuxy.creditsystem.applymag.controller;

import com.woniuxy.creditsystem.applymag.service.IApplyService;
import com.woniuxy.creditsystem.common.bean.DtoApply;
import com.woniuxy.creditsystem.common.util.ResultMsg;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ：zhengbin
 * @date ：Created in 2020/12/15 0015
 * @description：
 * @modified By：
 * @version:
 */


@RequestMapping("reexamine")
@RestController
public class ReexamineController {

    @Resource
    private IApplyService applyServiceImpl;


    @ResponseBody
    @GetMapping(value = "/some",produces = "application/json;charset=utf-8")
    public ResultMsg<List<DtoApply>> findByStatus(String status){

        ResultMsg<List<DtoApply>>  resultMsg = new ResultMsg();
        System.out.println("all............"+status);
        List<DtoApply> lists= applyServiceImpl.findByStatus(status);
        System.out.println("查询结果");
        System.out.println(lists);
        resultMsg.setData(lists);
        resultMsg.setCode(200);
        resultMsg.setMsg("操作成功");
        return  resultMsg;

    }
}
